package com.dodoke.service.impl;

import com.dodoke.beans.User;
import com.dodoke.mapper.UserMapper;
import com.dodoke.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public boolean login(User user) {
        User u = userMapper.getUserByUsernameAndPassword(user.getUsername(), user.getPassword());
        return u != null;
    }
}
